//
//  HomeView.h
//  eticket
//
//  Created by AnhQuocNguyen on 4/10/13.
//  Copyright (c) 2013 SoinMedia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ListEventViewCell.h"
#import "MBProgressHUD.h"
#import "EGORefreshTableHeaderView.h"
#import "EventTicket.h"
#import "EventDetailView.h"
#import "ASIFormDataRequest.h"
@protocol HomeViewDelegate;
@interface HomeView : UIView<UITableViewDelegate, UITableViewDataSource, EGORefreshTableHeaderDelegate, listEventViewCellDelegate, eventDetailViewDelegate>{
    
    IBOutlet UIButton *_btnPre;
    IBOutlet UIButton *_btnNext;
    IBOutlet UIView *_parentSliderView;
    
    UITableView *_tblViewEvent;
    NSMutableArray *_arrListEvent;
    
    NSTimer *_timerSlider;
    NSInteger _indexSlider;
    BOOL _isClick;
    MBProgressHUD *mHud;
    BOOL mLoading;
    NSInteger _countTimeout;
    
    //Pull to refesh
    EGORefreshTableHeaderView *refeshHeaderTableView;
    int addingDuration;
    BOOL _reloading;
    
    
    EventDetailView *_eventDetailView;

}

@property (nonatomic, assign) id <HomeViewDelegate>  HomeViewDelegate;


- (IBAction)buttonSlider_Clicked:(id)sender;
- (void)setupUIforHomeView;
- (void)enableButtonSlider:(BOOL)enable;
- (void)refreshToServer;
//- (void)cancelRequest;
@end


@protocol HomeViewDelegate <NSObject>
- (void)homeViewReloadData;
- (void)homeViewDidSlectedGetTicket:(HomeView *)homeView;
- (void)homeViewBackFromEventDetailView:(HomeView *)homeView;
- (void)homeViewDidFinishDowloadData:(HomeView *)homeView;
@optional

@end